//    联系人信息页面:sellerBasic
//    公司信息页面:sellerCompany
//    corpFiles:法人身份证电子版（多图） 文件-->两张图
//    licenseFiles:营业执照副本电子版  文件
//    bankFiles:银行开户许可证电子版 文件
//    orgFiles:组织机构代码证电子版 文件
//    账务信息:sellerFinance
//    registFiles:税务登记电子版
//    taxCerFiles:一般纳税人资格证电子版
//    店铺页面:shopInfo
//    经营类目页面:shopTypes
//    店铺命名页面:shopNamed
//    审批form字段内容:sellerApprove
//
//    获取图片src接口地址,后面接图片id:imgSrc
var obj={
    "sellerBasic": {
        "applyProgress": 8,
        "applyResult": 11,
        "applyTime": "2016-11-25 16:57:31",
        "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa",
        "sellerMail": "7093949596@qq.com",
        "sellerMobile": "13800138000",
        "sellerName": "大茶达人",
        "userAccount": "gzzq",//new
        "userId": "1f3cde6d-8d16-4299-a21b-b40a03a3b7f5"
    },
    "sellerCompany": {
        "bankAccLicElc": "553b8b20-3430-4aa6-97d1-448597396520",
        "bizArea": "柳南区",
        "bizBrovince": "广西",
        "bizCity": "柳州",
        "bizDetailAdd": "广西",
        "bizScope": "经营范围",
        "bizTermEnd": "2022-11-01",
        "bizTermStart": "2016-11-01",
        "companyArea": "蓬江区",
        "companyBrovince": "广东",
        "companyCity": "江门",
        "companyDetailAdd": "广州市天河区广场路绿地中央广场23号1501",
        "companyName": "狂飙突进股份有限公司",
        "companyTel": "020-12345678",
        "corpIdentity": "123456789654123658",
        "corpIdentityElc": "1c928067-26b9-46bd-b83e-f0591ca82a01",
        "corpName": "优茶达人",
        "id": 2,
        "identityType": 1,
        "licenseElc": "8acdd158-99c9-4783-9ec1-e43b3b72024d",
        "licenseForever": 0,
        "licenseType": 2,
        "orgCode": "EOF123456",
        "orgCodeElc": "94797863-485b-47f3-8ef3-84bc37bc54bc",
        "orgCodeForever": 5,
        "orgCodeStart": "2016-11-01",
        "registerCapital": 111,
        "registerDate": "2016-11-01",
        "registerNumber": "KB888",
        "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa",
    },

    "corpFiles": [{
        "id": 29,
        "resAccount": "admin",
        "resExt": "jpg",
        "resId": "1c928067-26b9-46bd-b83e-f0591ca82a01",
        "resName": "a1.jpg",
        "resPath": "\\2016/11/25\\c368407b-0a25-41f2-b36f-a3d5d66f4c0b.jpg",
        "resSize": 3497,
        "resType": "image",
        "resUploadTime": "2016-11-25 15:32:54"
    },
        {
            "id": 32,
            "resAccount": "admin",
            "resExt": "jpg",
            "resId": "1c928067-26b9-46bd-b83e-f0591ca82a01",
            "resName": "a4.jpg",
            "resPath": "\\2016/11/25\\ea248a4c-5994-489e-a726-fa87b289d935.jpg",
            "resSize": 5916,
            "resType": "image",
            "resUploadTime": "2016-11-25 15:33:03"
        }],
    "licenseFiles": [{
        "id": 30,
        "resAccount": "admin",
        "resExt": "jpg",
        "resId": "8acdd158-99c9-4783-9ec1-e43b3b72024d",
        "resName": "a2.jpg",
        "resPath": "\\2016/11/25\\53509892-c01e-4714-ad13-1d9e80178274.jpg",
        "resSize": 19568,
        "resType": "image",
        "resUploadTime": "2016-11-25 15:32:56"
    }],
    "bankFiles": [{
        "id": 31,
        "resAccount": "admin",
        "resExt": "jpg",
        "resId": "553b8b20-3430-4aa6-97d1-448597396520",
        "resName": "a3.jpg",
        "resPath": "\\2016/11/25\\00ad07c3-b89e-49be-8bf4-a2cb873f3966.jpg",
        "resSize": 6790,
        "resType": "image",
        "resUploadTime": "2016-11-25 15:32:59"
    }],
    "orgFiles": [{
        "id": 33,
        "resAccount": "admin",
        "resExt": "jpg",
        "resId": "94797863-485b-47f3-8ef3-84bc37bc54bc",
        "resName": "a2.jpg",
        "resPath": "\\2016/11/25\\a82c46e2-d936-499b-8c3a-d294953b5d6a.jpg",
        "resSize": 19568,
        "resType": "image",
        "resUploadTime": "2016-11-25 15:33:17"
    }],

    "sellerFinance": {
        "bankArea": "友谊县",
        "bankBrLine": "123456789",
        "bankBrName": "工商银行",
        "bankBrovince": "黑龙江",
        "bankCity": "双鸭山",
        "companyBankAcc": "6236541236541236",
        "id": 2,
        "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa",
        "taxCerElc": "36c388f1-0dca-4d97-a537-48c42d9d61cf",
        "taxIdentityNum": "EOM123654",
        "taxRegistElc": "0601d474-f98f-4102-b21e-22b6e729e723",
        "taxpayerTaxCode": 6,
        "taxpayerType": 2
    },
    "registFiles": [{
        "id": 34,
        "resAccount": "admin",
        "resExt": "jpg",
        "resId": "0601d474-f98f-4102-b21e-22b6e729e723",
        "resName": "a1.jpg",
        "resPath": "\\2016/11/25\\1c1ae974-46fa-4897-a3ec-56488dbf4270.jpg",
        "resSize": 3497,
        "resType": "image",
        "resUploadTime": "2016-11-25 15:43:26"
    }],

    "taxCerFiles": [{
        "id": 35,
        "resAccount": "admin",
        "resExt": "jpg",
        "resId": "36c388f1-0dca-4d97-a537-48c42d9d61cf",
        "resName": "a2.jpg",
        "resPath": "\\2016/11/25\\361159a9-c644-46d8-8f15-f0181254eff9.jpg",
        "resSize": 19568,
        "resType": "image",
        "resUploadTime": "2016-11-25 15:43:28"
    }],

    "shopInfo": {
        "avePrice": 4,
        "companyManu": 2,
        "companyWeb": "http://ucenter.goetui.com",
        "erpType": 1,
        "id": 2,
        "isBtdLogistics": 2,
        "isBtdStorage": 1,
        "isWebExp": 1,
        "logisticsCompany": "圆通",
        "netSalesVolume": 3,
        "oneYearSales": "123",
        "operCompanyName": "溜须拍马玩儿",
        "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa",
        "shopAddress": "http://ucenter.goetui.com",
        "shopOperator": 1,
        "storeAddress": "萝岗",
        "storeSituation": 2
    },

    "shopTypes": [{
        "categoryMain": "茶具",
        "categoryOne": "茶叶",
        "categoryTwo": "乌龙茶(青茶)",
        "id": 8,
        "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa"
        },
        {
            "categoryMain": "茶具",
            "categoryOne": "茶叶",
            "categoryTwo": "绿茶",
            "id": 9,
            "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa"
        }],

    "shopNamed": {
        "id": 2,
        "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa",
        "shopKeyword": "急口令",
        "shopNameExp": "嘿嘿冰层",
        "shopNameLogin": "淡不旧框框",
        "shopNameSuffix": 1,
        "shopNamedRule": "6入是让"
    },

    "sellerApprove": {
        "applyStep": "入驻信息提交",
        "approveOpinion": "资质材料完善,审批通过",
        "approveResult": 11,
        "id": 1,
        "sellerId": "00e9ff6d-50ea-4e02-a7e4-69c80d79e6aa",
        "sellerName": "大茶达人"
    },

    "imgSrc": "/sellerApply/getImg?id="
}
//document.getElementById('tempCon').append(html);
$.ajax({
    type:'post',
    url:'',
    contentType : 'application/json;charset=utf-8',
    data:obj,
    dataType:'json',
    success:function(data){

    },
    error:function(){
    }
});
window.onload=function(){
    console.log(obj.shopTypes)
    var html = template('charterTemp', obj);
    var con=document.getElementsByClassName('container')[0];
    con.innerHTML=html;
    $(function(){
        $('img').on('click',function(){
            var th=$(this).attr('src');
            parent.layer.open({
                type: 1,
                title: false,
                maxmin:true,
                shadeClose: true,
                closeBtn: 1,
                area:['600px','500px'],
                skin: 'layui-layer-nobg', //没有背景色
                content: "<img width='600px' height='400px' src='"+th+"'>"
            })
        })
    })
}